package cn.wolfcode.car.interceptor;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


public class LoginInterceptor implements HandlerInterceptor {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        String requestURI = request.getRequestURI();
        if (requestURI.toString().contains("employee")) {
            response.setContentType("text/html;charset=utf-8");
            response.getWriter().write("请注意");
        return false;

        }
        return true;
    }
}
